<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.9" />
<title>移动app开发说明文档</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */

/* Default font. */
body {
  font-family: Georgia,serif;
}

/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
  font-family: Arial,Helvetica,sans-serif;
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}
h5 {
  font-size: 1.0em;
}

div.sectionbody {
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}
ul > li     { color: #aaa; }
ul > li > * { color: black; }

.monospaced, code, pre {
  font-family: "Courier New", Courier, monospace;
  font-size: inherit;
  color: navy;
  padding: 0;
  margin: 0;
}
pre {
  white-space: pre-wrap;
}

#author {
  color: #527bbd;
  font-weight: bold;
  font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}

#footer {
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

#preamble {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.0em;
  margin-bottom: 2.0em;
  margin-right: 10%;
  color: #606060;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid #dddddd;
  border-left: 4px solid #f0f0f0;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid #dddddd;
  border-left: 5px solid #f0f0f0;
  background: #f8f8f8;
  padding: 0.5em;
}

div.quoteblock, div.verseblock {
  padding-left: 1.0em;
  margin-left: 1.0em;
  margin-right: 10%;
  border-left: 5px solid #f0f0f0;
  color: #888;
}

div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock > pre.content {
  font-family: inherit;
  font-size: inherit;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 3px solid #dddddd;
}

div.exampleblock > div.content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
ol.arabic {
  list-style-type: decimal;
}
ol.loweralpha {
  list-style-type: lower-alpha;
}
ol.upperalpha {
  list-style-type: upper-alpha;
}
ol.lowerroman {
  list-style-type: lower-roman;
}
ol.upperroman {
  list-style-type: upper-roman;
}

div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

tfoot {
  font-weight: bold;
}
td > div.verse {
  white-space: pre;
}

div.hdlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
div.hdlist tr {
  padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
  font-weight: bold;
}
td.hdlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
  color: navy;
}
td.hdlist2 {
  vertical-align: top;
}
div.hdlist.compact tr {
  margin: 0;
  padding-bottom: 0;
}

.comment {
  background: yellow;
}

.footnote, .footnoteref {
  font-size: 0.8em;
}

span.footnote, span.footnoteref {
  vertical-align: super;
}

#footnotes {
  margin: 20px 0 20px 0;
  padding: 7px 0 0 0;
}

#footnotes div.footnote {
  margin: 0 0 5px 0;
}

#footnotes hr {
  border: none;
  border-top: 1px solid silver;
  height: 1px;
  text-align: left;
  margin-left: 0;
  width: 20%;
  min-width: 100px;
}

div.colist td {
  padding-right: 0.5em;
  padding-bottom: 0.3em;
  vertical-align: top;
}
div.colist td img {
  margin-top: 0.3em;
}

@media print {
  #footer-badges { display: none; }
}

#toc {
  margin-bottom: 2.5em;
}

#toctitle {
  color: #527bbd;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.0em;
  margin-bottom: 0.1em;
}

div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  margin-top: 0;
  margin-bottom: 0;
}
div.toclevel2 {
  margin-left: 2em;
  font-size: 0.9em;
}
div.toclevel3 {
  margin-left: 4em;
  font-size: 0.9em;
}
div.toclevel4 {
  margin-left: 6em;
  font-size: 0.9em;
}

span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }

span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }

span.big { font-size: 2em; }
span.small { font-size: 0.6em; }

span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }

div.unbreakable { page-break-inside: avoid; }


/*
 * xhtml11 specific
 *
 * */

div.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.tableblock > table {
  border: 3px solid #527bbd;
}
thead, p.table.header {
  font-weight: bold;
  color: #527bbd;
}
p.table {
  margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
  border-style: none;
}
div.tableblock > table[frame="hsides"] {
  border-left-style: none;
  border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
  border-top-style: none;
  border-bottom-style: none;
}


/*
 * html5 specific
 *
 * */

table.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
thead, p.tableblock.header {
  font-weight: bold;
  color: #527bbd;
}
p.tableblock {
  margin-top: 0;
}
table.tableblock {
  border-width: 3px;
  border-spacing: 0px;
  border-style: solid;
  border-color: #527bbd;
  border-collapse: collapse;
}
th.tableblock, td.tableblock {
  border-width: 1px;
  padding: 4px;
  border-style: solid;
  border-color: #527bbd;
}

table.tableblock.frame-topbot {
  border-left-style: hidden;
  border-right-style: hidden;
}
table.tableblock.frame-sides {
  border-top-style: hidden;
  border-bottom-style: hidden;
}
table.tableblock.frame-none {
  border-style: hidden;
}

th.tableblock.halign-left, td.tableblock.halign-left {
  text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
  text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
  text-align: right;
}

th.tableblock.valign-top, td.tableblock.valign-top {
  vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
  vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
  vertical-align: bottom;
}


/*
 * manpage specific
 *
 * */

body.manpage h1 {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  border-top: 2px solid silver;
  border-bottom: 2px solid silver;
}
body.manpage h2 {
  border-style: none;
}
body.manpage div.sectionbody {
  margin-left: 3em;
}

@media print {
  body.manpage div#toc { display: none; }
}


</style>
<script type="text/javascript">
/*<![CDATA[*/
var asciidoc = {  // Namespace.

/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////

/* Author: Mihai Bazon, September 2002
 * http://students.infoiasi.ro/~mishoo
 *
 * Table Of Content generator
 * Version: 0.4
 *
 * Feel free to use this script under the terms of the GNU General Public
 * License, as long as you do not remove or alter this notice.
 */

 /* modified by Troy D. Hanson, September 2006. License: GPL */
 /* modified by Stuart Rackham, 2006, 2009. License: GPL */

// toclevels = 1..4.
toc: function (toclevels) {

  function getText(el) {
    var text = "";
    for (var i = el.firstChild; i != null; i = i.nextSibling) {
      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
        text += i.data;
      else if (i.firstChild != null)
        text += getText(i);
    }
    return text;
  }

  function TocEntry(el, text, toclevel) {
    this.element = el;
    this.text = text;
    this.toclevel = toclevel;
  }

  function tocEntries(el, toclevels) {
    var result = new Array;
    var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
    // Function that scans the DOM tree for header elements (the DOM2
    // nodeIterator API would be a better technique but not supported by all
    // browsers).
    var iterate = function (el) {
      for (var i = el.firstChild; i != null; i = i.nextSibling) {
        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
          var mo = re.exec(i.tagName);
          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
          }
          iterate(i);
        }
      }
    }
    iterate(el);
    return result;
  }

  var toc = document.getElementById("toc");
  if (!toc) {
    return;
  }

  // Delete existing TOC entries in case we're reloading the TOC.
  var tocEntriesToRemove = [];
  var i;
  for (i = 0; i < toc.childNodes.length; i++) {
    var entry = toc.childNodes[i];
    if (entry.nodeName.toLowerCase() == 'div'
     && entry.getAttribute("class")
     && entry.getAttribute("class").match(/^toclevel/))
      tocEntriesToRemove.push(entry);
  }
  for (i = 0; i < tocEntriesToRemove.length; i++) {
    toc.removeChild(tocEntriesToRemove[i]);
  }

  // Rebuild TOC entries.
  var entries = tocEntries(document.getElementById("content"), toclevels);
  for (var i = 0; i < entries.length; ++i) {
    var entry = entries[i];
    if (entry.element.id == "")
      entry.element.id = "_toc_" + i;
    var a = document.createElement("a");
    a.href = "#" + entry.element.id;
    a.appendChild(document.createTextNode(entry.text));
    var div = document.createElement("div");
    div.appendChild(a);
    div.className = "toclevel" + entry.toclevel;
    toc.appendChild(div);
  }
  if (entries.length == 0)
    toc.parentNode.removeChild(toc);
},


/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////

/* Based on footnote generation code from:
 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
 */

footnotes: function () {
  // Delete existing footnote entries in case we're reloading the footnodes.
  var i;
  var noteholder = document.getElementById("footnotes");
  if (!noteholder) {
    return;
  }
  var entriesToRemove = [];
  for (i = 0; i < noteholder.childNodes.length; i++) {
    var entry = noteholder.childNodes[i];
    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
      entriesToRemove.push(entry);
  }
  for (i = 0; i < entriesToRemove.length; i++) {
    noteholder.removeChild(entriesToRemove[i]);
  }

  // Rebuild footnote entries.
  var cont = document.getElementById("content");
  var spans = cont.getElementsByTagName("span");
  var refs = {};
  var n = 0;
  for (i=0; i<spans.length; i++) {
    if (spans[i].className == "footnote") {
      n++;
      var note = spans[i].getAttribute("data-note");
      if (!note) {
        // Use [\s\S] in place of . so multi-line matches work.
        // Because JavaScript has no s (dotall) regex flag.
        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
        spans[i].innerHTML =
          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
        spans[i].setAttribute("data-note", note);
      }
      noteholder.innerHTML +=
        "<div class='footnote' id='_footnote_" + n + "'>" +
        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
        n + "</a>. " + note + "</div>";
      var id =spans[i].getAttribute("id");
      if (id != null) refs["#"+id] = n;
    }
  }
  if (n == 0)
    noteholder.parentNode.removeChild(noteholder);
  else {
    // Process footnoterefs.
    for (i=0; i<spans.length; i++) {
      if (spans[i].className == "footnoteref") {
        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
        href = href.match(/#.*/)[0];  // Because IE return full URL.
        n = refs[href];
        spans[i].innerHTML =
          "[<a href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
      }
    }
  }
},

install: function(toclevels) {
  var timerId;

  function reinstall() {
    asciidoc.footnotes();
    if (toclevels) {
      asciidoc.toc(toclevels);
    }
  }

  function reinstallAndRemoveTimer() {
    clearInterval(timerId);
    reinstall();
  }

  timerId = setInterval(reinstall, 500);
  if (document.addEventListener)
    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
  else
    window.onload = reinstallAndRemoveTimer;
}

}
asciidoc.install(2);
/*]]>*/
</script>
</head>
<body class="article">
<div id="header">
<h1>移动app开发说明文档</h1>
<span id="author">徐旗江</span><br />
<span id="email"><code>&lt;<a href="mailto:ICErupt@126.com">ICErupt@126.com</a>&gt;</code></span><br />
<span id="revdate">学号 913106840320 班级 9131065502</span>
<div id="toc">
  <div id="toctitle">Table of Contents</div>
  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div style="page-break-after:always"></div>
</div>
</div>
<div class="sect1">
<h2 id="_功能说明">1. 功能说明</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
android移动app，包含：
</p>
<div class="olist arabic"><ol class="arabic">
<li>
<p>
背景音乐的播放（进入后台自动停止）；
</p>
</li>
<li>
<p>
视频播放；
</p>
</li>
<li>
<p>
图片查看，点击打开可以缩放；
</p>
</li>
<li>
<p>
文字内容介绍；
</p>
</li>
<li>
<p>
微博关注和最新微博，微博sso授权登录和发微博；
</p>
</li>
<li>
<p>
侧栏菜单（从边缘划出）；
</p>
</li>
<li>
<p>
滑动切页（上下滑动）；
</p>
</li>
<li>
<p>
晃动（摇一摇）切页；
</p>
</li>
<li>
<p>
网络状态检测及提醒；
</p>
</li>
<li>
<p>
退出确认提醒；
</p>
</li>
<li>
<p>
整体简洁美观的前端设计；
</p>
</li>
<li>
<p>
安装包小于5Mb。
</p>
</li>
</ol></div>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_架构说明">2. 架构说明</h2>
<div class="sectionbody">
<div class="paragraph"><p>使用 PhoneGap/Cordova 进行跨平台开发，开发web app可以导出到任意平台，
本项目中只导出了 Android 平台。</p></div>
<div class="paragraph"><p>前端使用 jQuery 以及 jQuery Mobile 作为本项目简单的 SAP(Single-Page Applications) 框架。
使用 Semantic UI 以及 fullPage.js 作为前端设计框架。当然还使用到了 Video.js(HTML5 Video Player Framework),
Hammer.js(for touch gestures), 以及 jQuery UI。</p></div>
<div class="sect2">
<h3 id="_前端架构">2.1. 前端架构</h3>
<div class="paragraph"><p>首先，用 fullPage.js 可以实现 app 的滑动切页，每一页是一个 section，每个 section
还能有横向的 slide 继续切换。在这个基础上，使用 Semantic UI 进行 responsive 的 web 设计，
使用到了各式各样的 Semantic 提供的组件，包括侧边栏菜单。侧边栏菜单绑定到了第一页
左上角的菜单按钮，可以点击这个按钮触发，也可以通过在屏幕右边缘向右滑动触发，
这是通过 Hammer.js 对手势的支持实现的。</p></div>
</div>
<div class="sect2">
<h3 id="_后端架构">2.2. 后端架构</h3>
<div class="paragraph"><p>整个后端（没有太分离的后端）在 index.js 里，核心部分由 cordova 的事件支持。
我们先列举一下使用到的 cordova plugin。</p></div>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="50%" />
<col width="50%" />
<tbody>
<tr>
<td align="left" valign="top"><p class="table">cordova plguin</p></td>
<td align="left" valign="top"><p class="table">作用</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-battery-status</p></td>
<td align="left" valign="top"><p class="table">检测电源状态</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-camera</p></td>
<td align="left" valign="top"><p class="table">为选择图片或者拍照提供接口</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-compat</p></td>
<td align="left" valign="top"><p class="table">cordova向后兼容问题</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-console</p></td>
<td align="left" valign="top"><p class="table">console.log()</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-device</p></td>
<td align="left" valign="top"><p class="table">定义为全局 device 对象，描述硬件信息</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-device-motion</p></td>
<td align="left" valign="top"><p class="table">提供对设备加速度传感器的接口，来感知设备移动</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-dialogs</p></td>
<td align="left" valign="top"><p class="table">提供一些本地化的 dialog ui</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-file</p></td>
<td align="left" valign="top"><p class="table">可以对设备上的文件进行读写</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-inappbrowser</p></td>
<td align="left" valign="top"><p class="table">提供显示 web 浏览器的浏览</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-media</p></td>
<td align="left" valign="top"><p class="table">可以对音频文件进行播放或者录制</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-network-information</p></td>
<td align="left" valign="top"><p class="table">可以探测设备网络信息</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-shake</p></td>
<td align="left" valign="top"><p class="table">可以以不同灵敏度感知设备摇晃</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-splashscreen</p></td>
<td align="left" valign="top"><p class="table">启动画面</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-whitelist</p></td>
<td align="left" valign="top"><p class="table">为应用访问外部网站提供白名单指南</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-x-toast</p></td>
<td align="left" valign="top"><p class="table">可以显示一个可应以样式的toast(文字弹框)</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">cordova-plugin-weibo</p></td>
<td align="left" valign="top"><p class="table">新浪sdk的封装插件，可以sso login和分享发送微博</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_项目目录结构">2.3. 项目目录结构</h3>
<div class="paragraph"><p>项目二目录结构如下：</p></div>
<div class="listingblock">
<div class="title">tree -L 2</div>
<div class="content">
<pre><code>.
├── config.xml
├── doc
│   ├── readme.asciidoc
│   └── readme.html
├── hooks
│   └── README.md
├── platforms
│   ├── android
│   ├── browser
│   └── platforms.json
├── plugins
│   ├── android.json
│   ├── browser.json
│   ├── cordova-plugin-battery-status
│   ├── cordova-plugin-camera
│   ├── cordova-plugin-compat
│   ├── cordova-plugin-console
│   ├── cordova-plugin-device
│   ├── cordova-plugin-device-motion
│   ├── cordova-plugin-dialogs
│   ├── cordova-plugin-file
│   ├── cordova-plugin-inappbrowser
│   ├── cordova-plugin-media
│   ├── cordova-plugin-network-information
│   ├── cordova-plugin-shake
│   ├── cordova-plugin-splashscreen
│   ├── cordova-plugin-weibo
│   ├── cordova-plugin-whitelist
│   ├── cordova-plugin-x-toast
│   └── fetch.json
├── res
│   └── screen
└── www
    ├── assets
    ├── css
    ├── img
    ├── index.html
    ├── js
    └── node_modules</code></pre>
</div></div>
<div class="paragraph"><p>platforms 下是本项目测试的平台，包括 web browser 和 android 端；
plugin 下面就是刚刚列举的 cordova plugin，res 下面是一些项目的资源；
www 下面就是 web app 的主要内容，保护 html, css, js 以及 web app 所需要的资源（图片）。
(因为要使得导出小于5M，所以空间占用大的资源（如：视频）都使用了在线资源。)
doc 下就是项目文档。</p></div>
</div>
<div class="sect2">
<h3 id="_功能实现">2.4. 功能实现</h3>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="50%" />
<col width="50%" />
<tbody>
<tr>
<td align="left" valign="top"><p class="table">功能</p></td>
<td align="left" valign="top"><p class="table">实现</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">背景音乐</p></td>
<td align="left" valign="top"><p class="table">使用 cordova media plugin</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">视频</p></td>
<td align="left" valign="top"><p class="table">使用 video.js HTML5 视频，宽度适应屏幕。和音频一起，维护全局单例</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">照片，图片</p></td>
<td align="left" valign="top"><p class="table">用 fullpage 的 slide 显示不同图片，使用 inappbrowser 实现图片缩放</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">侧栏菜单</p></td>
<td align="left" valign="top"><p class="table">semantic responsive sidebar，用 hammer.js 实现手势从边缘划出菜单</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">摇动切换</p></td>
<td align="left" valign="top"><p class="table">利用 cordova shake 插件，感应摇动，实现上下周期切换页</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">检测网络状态</p></td>
<td align="left" valign="top"><p class="table">利用 cordova network 插件，如果没有网络发一个 toast 提醒，如果网络断开也发送一个 toast 提醒，如果网络重新连接，刷新页面</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">横竖屏，多分辨率适应</p></td>
<td align="left" valign="top"><p class="table">这个 web app 是 responsive 的，所以可以做到自适应</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">启动动画</p></td>
<td align="left" valign="top"><p class="table">cordova splash screen 即可实现，不过实现准备好各种分辨率的 splash screen 图片就好</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">微博</p></td>
<td align="left" valign="top"><p class="table">用微博的 web widget 可以插入关注和最新微博的代码</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">渐变背景</p></td>
<td align="left" valign="top"><p class="table">用 css3 就可以实现背景的渐变</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">sso授权登录微博，发生微博，检测本地是否有微博客户端</p></td>
<td align="left" valign="top"><p class="table">使用cordova-plugin-weibo对微博sdk封装的api</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">后台暂停媒体</p></td>
<td align="left" valign="top"><p class="table">监听到pause事件表示应用被切到后台，暂停全局媒体播放</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_corodva_监听事件">2.5. corodva 监听事件</h3>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="50%" />
<col width="50%" />
<tbody>
<tr>
<td align="left" valign="top"><p class="table">事件</p></td>
<td align="left" valign="top"><p class="table">说明</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">deviceready</p></td>
<td align="left" valign="top"><p class="table">当 Cordova 完全加载的时候触发</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">online</p></td>
<td align="left" valign="top"><p class="table">当网络连接时触发</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">offline</p></td>
<td align="left" valign="top"><p class="table">当网络断开时触发</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">backbutton</p></td>
<td align="left" valign="top"><p class="table">当返回键按下时触发</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">pause</p></td>
<td align="left" valign="top"><p class="table">当 app 被放到后台时触发</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">resume</p></td>
<td align="left" valign="top"><p class="table">当 app 从后台回到前台触发</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_部分使用说明">3. 部分使用说明</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_侧栏">3.1. 侧栏</h3>
<div class="paragraph"><p>从左侧边缘向右滑动可以呼出侧栏菜单。这里的边缘是指屏幕边界内靠近边缘出，因为android手机在屏幕边界外可能没有触控感应。</p></div>
</div>
<div class="sect2">
<h3 id="_滑动切换">3.2. 滑动切换</h3>
<div class="paragraph"><p>在空白处上下滑动可以完成不同页的切换，如果一页内有很多子页面内容可以通过左右滑动切换。
有左右滑动的页面也有两个左右箭头，也可以通过点击箭头完成切换。</p></div>
</div>
<div class="sect2">
<h3 id="_个人简介页面">3.3. 个人简介页面</h3>
<div class="paragraph"><p>点击个人简介卡片上的照片可以渐变显示一个contact按钮，点击可以通过Telegram联系我。</p></div>
</div>
<div class="sect2">
<h3 id="_奖项页面">3.4. 奖项页面</h3>
<div class="paragraph"><p>点击具体奖项有动态响应效果</p></div>
</div>
<div class="sect2">
<h3 id="_图片展示页面">3.5. 图片展示页面</h3>
<div class="paragraph"><p>为了用更清楚的照片方便的展示，没有拍自己的证书作为图片，而是网上的图片。
点击图片会进入另一个视窗，双击或两个手指的拖动(pinch)可以放大。点击返回键或者右上角的'X'可以返回。</p></div>
</div>
<div class="sect2">
<h3 id="_微博加关注">3.6. 微博加关注</h3>
<div class="paragraph"><p>微博加关注可以点上面那个小的关注按钮，使用的是微博组建。因为微博sdk里面已经不在提供对初级权限的关注接口（仅对微博类客户端开放）。</p></div>
</div>
<div class="sect2">
<h3 id="_微博授权登录">3.7. 微博授权登录</h3>
<div class="paragraph"><p>我在open weibo上注册了一个app，并没有什么功能，只是提供了个移动接口，作为测试。</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_测试平台">4. 测试平台</h2>
<div class="sectionbody">
<div class="olist arabic"><ol class="arabic">
<li>
<p>
flyme5.2.1.0A Android 6.0
</p>
</li>
<li>
<p>
MIUI 8 6.6.30 Android 5.0.2
</p>
</li>
<li>
<p>
Samsung GT-N7108 Android 4.3
</p>
</li>
</ol></div>
</div>
</div>
<div class="sect1">
<h2 id="_演示截图">5. 演示截图</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_启动画面">5.1. 启动画面</h3>
<div class="imageblock">
<div class="content">
<img src="img/splash.jpg" alt="img/splash.jpg" width="200" height="340" />
</div>
</div>
</div>
<div class="sect2">
<h3 id="_主页面">5.2. 主页面</h3>
<div class="imageblock">
<div class="content">
<img src="img/home.jpg" alt="img/home.jpg" width="200" height="340" />
</div>
</div>
<div style="page-break-after:always"></div>
</div>
<div class="sect2">
<h3 id="_个人简介">5.3. 个人简介</h3>
<div class="imageblock">
<div class="content">
<img src="img/motto.jpg" alt="img/motto.jpg" width="200" height="340" />
</div>
</div>
</div>
<div class="sect2">
<h3 id="_图片展示">5.4. 图片展示</h3>
<div class="imageblock">
<div class="content">
<img src="img/pic.jpg" alt="img/pic.jpg" width="200" height="340" />
</div>
</div>
<div style="page-break-after:always"></div>
</div>
<div class="sect2">
<h3 id="_图片放大">5.5. 图片放大</h3>
<div class="paragraph"><p>单击图片，既可进入可放大缩小的界面。</p></div>
<div class="imageblock">
<div class="content">
<img src="img/pic-zoom.jpg" alt="img/pic-zoom.jpg" width="200" height="340" />
</div>
</div>
</div>
<div class="sect2">
<h3 id="_视频展示">5.6. 视频展示</h3>
<div class="imageblock">
<div class="content">
<img src="img/video.jpg" alt="img/video.jpg" width="200" height="340" />
</div>
</div>
<div style="page-break-after:always"></div>
</div>
<div class="sect2">
<h3 id="_微博">5.7. 微博</h3>
<div class="paragraph"><p>微博头像，关注微博，最新微博</p></div>
<div class="imageblock">
<div class="content">
<img src="img/weiboxiu.jpg" alt="img/weiboxiu.jpg" width="200" height="340" />
</div>
</div>
<div class="paragraph"><p>微博sso授权登录，分享</p></div>
<div class="imageblock">
<div class="content">
<img src="img/weibo-sso.jpg" alt="img/weibo-sso.jpg" width="200" height="340" />
</div>
</div>
<div style="page-break-after:always"></div>
<div class="paragraph"><p>检测本地微博客户端</p></div>
<div class="imageblock">
<div class="content">
<img src="img/check.jpg" alt="img/check.jpg" width="200" height="340" />
</div>
</div>
<div class="paragraph"><p>sso授权登录页面</p></div>
<div class="imageblock">
<div class="content">
<img src="img/sso-login.jpg" alt="img/sso-login.jpg" width="200" height="340" />
</div>
</div>
<div style="page-break-after:always"></div>
</div>
<div class="sect2">
<h3 id="_横屏">5.8. 横屏</h3>
<div class="paragraph"><p>视频横屏</p></div>
<div class="imageblock">
<div class="content">
<img src="img/video-rot.jpg" alt="img/video-rot.jpg" width="340" height="200" />
</div>
</div>
<div class="paragraph"><p>文字横屏</p></div>
<div class="imageblock">
<div class="content">
<img src="img/honor-rot.jpg" alt="img/honor-rot.jpg" width="340" height="200" />
</div>
</div>
</div>
<div class="sect2">
<h3 id="_网络状态">5.9. 网络状态</h3>
<div class="paragraph"><p>断开连接</p></div>
<div class="imageblock">
<div class="content">
<img src="img/offline.jpg" alt="img/offline.jpg" width="200" height="340" />
</div>
</div>
<div class="paragraph"><p>无网络连接</p></div>
<div class="imageblock">
<div class="content">
<img src="img/no-network.jpg" alt="img/no-network.jpg" width="200" height="340" />
</div>
</div>
<div class="paragraph"><p>重新连接网络</p></div>
<div class="imageblock">
<div class="content">
<img src="img/online.jpg" alt="img/online.jpg" width="200" height="340" />
</div>
</div>
</div>
<div class="sect2">
<h3 id="_退出应用">5.10. 退出应用</h3>
<div class="imageblock">
<div class="content">
<img src="img/quit.jpg" alt="img/quit.jpg" width="200" height="340" />
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2016-07-04 11:56:46 CST
</div>
</div>
</body>
</html>
